<div id="owner-overview" class="block">
	<div class="block-title">Overview</div>
	<div class="col-1">
		<h2 class="col-title">Account Annoucement</h2>
		<div class="col-body">
			<p>
				<?php echo substr($firstNews['content'], 0, 210)?>...
				<a href="<?php echo $this->createUrl('/site/newsView/id/'.$firstNews['article_id'])?>">Read More</a>
			</p>
			<ul>
				<?php foreach ($newsList as $i => $news): ?>
					<li>
						<a href="<?php echo $this->createUrl('/site/newsView/'.$news['article_id'])?>">
							<?php echo $news['title']?>
						</a>
					</li>
				<?php endforeach;?>
			</ul>
		</div>
	</div>
	<div class="col-2">
		<?php if (!$owner->inuse): ?>
		<p class="warning-msg">
			提示：<br />
			你的账号还没通过审核，请联系Qpid Affiliate管理员通过你的账号审核，这样你就可以获取代码进行推广了 。
		</p>
		<?php endif ?>
		
		<p>
		Hello <?php echo $owner['firstname'].' '.$owner['lastname']?>!
		Your account number is: <?php echo Yii::app()->user->name ?>.
		</p>
		<p>
	    Your current Qpid Affiliate program is: Per First Order. We are delighted to have you as our affiliate!<br />
		<p>
	
		<p>
		For your information, we also offer the "Per Lead" program. If you are interested and wish to change your program, please click here. 
		Your new commission program will take effect from the start of the next month.<br />
		</p>
		<p>
		If you encounter any problems at any time, please do not hesitate to <a href="<?php echo $this->createUrl("site/contact")?>">contact us</a>.<br />
		We will be more than happy to resolve your problems as soon and as quickly as we can.
		</p>
		
		<h2>Summary Report</h2>
		<div id="summary-report">
			<?php 
			$this->widget('zii.widgets.grid.CGridView', array(
					'id'=>'report-grid',
				 	'summaryText' => '',
					'dataProvider' => $reportData,
					'columns'=>array(
						array('name' => 'Website', 'value' => '$data->website'),
						array('name' => 'Date', 'value' => '$data->adddate'),
						array('name' => 'Clicks', 'value' => '$data->validclick'),
						array('name' => 'Members', 'value' => '$data->vjoinmb'),
						array('name' => 'Orders', 'value' => '$data->check_firstordernum')
					),
				));
			?>
		</div>
		
		<h2>Unpaid Balance</h2>
		<div id="balance-report">
			<?php 
			$this->widget('zii.widgets.grid.CGridView', array(
					'id'=>'summary-grid',
				 	'summaryText' => '',
					'dataProvider' => $balanceData,
					'columns'=>array(
						array('name' => 'Website', 'value' => '$data->website'),
						array('name' => 'Date', 'value' => '$data->year."-".$data->month'),
						array('name' => 'Commission', 'value' => '"\$".$data->commission'),
						//'amount'
						//'Members',
						//'Amount',
					),
				));
			?>
		</div>
	</div>
	<br class="clear" />
</div>